package com.pk.platform.util;

import java.io.InputStream;
import java.util.Properties;

public class PropertiesUtil {

	private Properties props = new Properties();
	
	public PropertiesUtil(String fileName)
	{
		String expandName = ".properties";
		String name = "";
		if(fileName.indexOf(expandName) > -1)
		{
			name = fileName;
		}
		else
		{
			name = fileName + expandName;
		}
		try
		{
			InputStream in = this.getClass().getClassLoader().getResourceAsStream(name);
			props.load(in);
		}
		catch (Exception e)
		{
			e.printStackTrace();
		}
	}
	
	public String getValue(String key)
	{
		return props.getProperty(key);
	}
	
}